package com.leedsoft.news2.activity;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.Window;
import android.view.WindowManager;
import com.leedsoft.news2.fragment.WebPageFragment;
import com.leedsoft.news2.fragment.SingleFragmentActivity;

/**
 * Created by leeds on 2016/9/5 11:01.
 */
public class WebPageActivity extends SingleFragmentActivity {
    @Override
    protected Fragment newFragment() {
        String pageUrl = getIntent().getData().toString();
        return WebPageFragment.newInstance(pageUrl);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        //hide title
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        //full screen
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
        super.onCreate(savedInstanceState);
    }
}
